package com.example.myapp.players;

import com.example.myapp.models.Game;
import com.example.myapp.models.Playable;

public abstract class Player implements Playable {

    private int faction;
    private Game game;

    @Override
    public abstract int[] getNextStep(int[] stateMatrix, int faction);

    public int getFaction() {
        return faction;
    }

    public void setFaction(int faction) {
        this.faction = faction;
    }

    public boolean isMyTurn() {
        return getFaction() == game.getControl().getCurrentPlayerId();
    }

    public Player() {}

    public Player(int f) {
        this.setFaction(f);
    }

    public Game getGame() {
        return game;
    }

    public void setGame(Game game) {
        this.game = game;
    }
}
